home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Run Magazine ReRun: Strategy Games 2
/
rerun-strategygamesII.d64
/
peg board
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-09-20
|
4KB
|
145 lines
2 printchr$(147)"would you like instructions (y/n)?
4 [161] a$: [139] a$[179][177] "y" [175] a$[179][177]"n" [167] 4
6 [139] a$[178]"n" [167] 66
8 [153]"instructions on screen or printer (s/p)?
10 get b$: if b$<> "s" and b$<>"p" then 10
12 if b$="s"then d=3
14 if b$="p" then d=4
16 open d,d
18 print#d,"
20 [152]d,"peg board by john olsen
22 print#d,"
24 [152]d,"run it right: c-64; joystick
26 print#d,"
28 [152]d,"peg board is played on a board
30 print#d,"perforated by 33 holes in a plus-sign
32 [152]d,"arrangement. as the game starts, there
34 print#d,"are pegs in every hole but the center
36 [152]d,"one. the object is to remove all of the
38 print#d,"pegs but one by jumping over them, one
40 [152]d,"at a time, with other pegs.
42 print#d,"
44 [152]d,"use your joystick in port two to place
46 print#d,"the yellow cursor on a peg you want to
48 [152]d,"move, then press fire. the peg will
50 print#d,"temporarily become an asterisk. next,
52 [152]d,"place the cursor where you want the peg
54 print#d,"to go and press fire again. as the peg
56 [152]d,"jumps, the one under it disappears. you
58 print#d,"can jump horizontally or vertically,
60 [152]d,"but not diagonally. play is over when no
62 print#d,"more jumps are possible.
64 [152]d,"":[160]d
66 [153]"press any key to begin the program..."
68 [161] e$:[139] e$[178]"" [167] 68
70 [156]
72 [143] pegboard 64 (c) 1986 john olsen
74 [151]53280,0:[151]53281,0:n%[178]9:m%[178]81:o%[178]80:p%[178]160:q%[178]156:r%[178]400:s[178]54272
76 [151]53265,[194](53265)[175]239
78 [153]"loadclr"[199](142)[199](8)[163]14)"ortantantantantantantantantan^"
80 [153][163]14)"(NULL)syspeg boardclr(NULL)"
82 [153][163]14)"/tantantantantantantantantanexp"
84 [153][163]13)"sysby john olsen"
86 [153]"openremove one"[163]31)"diagonal"
88 [153]"peg at a"[163]34)"jumps"
90 [153]"time, by"[163]32)"are not"
92 [153]"jumping"[163]32)"allowed"
94 [153]"over it"
96 [153]"with an"
98 [153]"adjacent"
100 [153]"peg"[163]31)
102 [153][163]32)"you win"
104 [153]"use your"[163]31)"when one"
106 [153]"joystick"[163]31)"peg only"
108 [153]"in port 2"[163]32)"remains"
110 [153]""[163]15)"stop+ + + + +"
112 [153][163]16)"ortan=tan=tan^"
114 [153][163]15)"stop+(NULL) (NULL) (NULL) (NULL)stop+"
116 [153][163]16)"-tan(NULL)tan(NULL)tan<"
118 [153][163]11)"stop+ + +(NULL) (NULL) (NULL) (NULL)stop+ + +"
120 [153][163]12)"ortan=tan(NULL)tan(NULL)tan(NULL)tan(NULL)tan=tan^"
122 [153][163]11)"stop+(NULL) (NULL) (NULL) (NULL) (NULL) (NULL) (NULL) (NULL)stop+"
124 [153][163]12)"-tan(NULL)tan(NULL)tan(NULL)tan(NULL)tan(NULL)tan(NULL)tan<"
126 [153][163]11)"stop+(NULL) (NULL) (NULL) (NULL) (NULL) (NULL) (NULL) (NULL)stop+"
128 [153][163]12)"-tan(NULL)tan(NULL)tan(NULL)tan(NULL)tan(NULL)tan(NULL)tan<"
130 [153][163]11)"stop+(NULL) (NULL) (NULL) (NULL) (NULL) (NULL) (NULL) (NULL)stop+"
132 [153][163]12)"/tan>tan(NULL)tan(NULL)tan(NULL)tan(NULL)tan>tanexp"
134 [153][163]11)"stop+ + +(NULL) (NULL) (NULL) (NULL)stop+ + +"
136 [153][163]16)"-tan(NULL)tan(NULL)tan<"
138 [153][163]15)"stop+(NULL) (NULL) (NULL) (NULL)stop+"
140 [153][163]16)"/tan>tan>tanexp"
142 [153][163]15)"stop+ + + + +"
144 [153]""[163]17)"sys(NULL)def(NULL)(NULL)"
146 [153][163]17)"(NULL)(NULL)(NULL)"
148 [153][163]13)"(NULL)(NULL)(NULL)(NULL)(NULL)(NULL)(NULL)"
150 [153][163]13)"(NULL)(NULL)(NULL) (NULL)(NULL)(NULL)"
152 [153][163]13)"(NULL)(NULL)(NULL)(NULL)(NULL)(NULL)(NULL)"
154 [153][163]17)"(NULL)(NULL)(NULL)"
156 [153][163]17)"(NULL)(NULL)(NULL)"
158 [151]53265,[194](53265)[176]16
160 bl[178]1361:l[178]bl
162 ll[178]l
164 [151]s[170]4,0:[151]s[170]23,0:[151]s[170]22,0
166 p[178]255[171]([194](56464)[176]128)
168 [139]p[175]16[167]190
170 [139]p[175]1[167]l[178]l[171]o%
172 [139]p[175]2[167]l[178]l[170]o%
174 [139]p[175]4[167]l[178]l[171]2
176 [139]p[175]8[167]l[178]l[170]2
178 [139]l[178]ll[167]166
180 [139][194](l)[178]43[167]l[178]ll:[137]166
182 [151]ll[170]54272,10:[139][194](ll)[178]p%[167][151]ll,32
184 [151]l[170]54272,7:[139][194](l)[178]32[167][151]l,p%
186 [141]282
188 [137]162
190 [146]56464,16
192 [139]sl[178].[175][194](l)[178]p%[167]162
194 [139][194](l)[178]42[167]sl[178].:[151]l,m%:[137]162
196 [139]sl[178].[167]sl[178]l:[151]l,42:[137]162
198 [139][182](sl[171]l)[179][177]p%[175][182](sl[171]l)[179][177]4[167]162
200 [139][194](l)[179][177]p%[167]162
202 t[178](sl[170]l)[173]2
204 [139][194](t)[178]32[167]162
206 [151]sl,32:[151]l,m%:[151]t,32
208 sl[178].:c[178].
210 [129]y[178].[164]1:[129]x[178].[164]2
212 t[178]bl[170]o%[172]y[170]2[172]x
214 [139][194](t)[178]m%[167]c[178]c[170]1:[137]222
216 [139][194](t[170]o%)[178]m%[167][139][194](t[170]p%)[178]m%[167]y[178]n%:x[178]n%:[137]222
218 [139]x[178].[167][139][194](t[170]2)[178]m%[167][139][194](t[170]4)[178]m%[167]y[178]n%:x[178]n%:[137]222
220 [139]x[178]2[167][139][194](t[171]2)[178]m%[167][139][194](t[171]4)[178]m%[167]y[178]n%:x[178]n%
222 [130]:[130]
224 [141]282
226 [139]x[177]n%[176]y[177]n%[167]162
228 [129]y[178].[164]2:[129]x[178].[164]6
230 t[178]bl[170]o%[172]y[170]2[172]x[170]q%
232 [139][194](t)[178]m%[167]c[178]c[170]1:[137]244
234 [139][194](t[170]o%)[178]m%[167][139][194](t[170]p%)[178]m%[167]y[178]n%:x[178]n%:[137]244
236 [139][194](t[171]o%)[178]m%[167][139][194](t[171]p%)[178]m%[167]y[178]n%:x[178]n%:[137]244
238 [139][194](t[170]2)[178]m%[167][139][194](t[170]4)[178]m%[167]y[178]n%:x[178]n%:[137]244
240 [139][194](t[171]2)[178]m%[167][139][194](t[171]4)[178]m%[167]y[178]n%:x[178]n%
242 [141]282
244 [130]:[130]
246 [139]x[177]n%[176]y[177]n%[167]162
248 [129]y[178].[164]1:[129]x[178].[164]2
250 t[178]bl[170]o%[172]y[170]2[172]x[170]r%
252 [139][194](t)[178]m%[167]c[178]c[170]1:[137]260
254 [139][194](t[171]o%)[178]m%[167][139][194](t[171]p%)[178]m%[167]y[178]n%:x[178]n%:[137]260
256 [139]x[178].[167][139][194](t[170]2)[178]m%[167][139][194](t[170]4)[178]m%[167]y[178]n%:x[178]n%:[137]260
258 [139]x[178]2[167][139][194](t[171]2)[178]m%[167][139][194](t[171]4)[178]m%[167]y[178]n%:x[178]n%
260 [130]:[130]
262 [139]x[177]n%[176]y[177]n%[167]162
264 [151]l[170]54272,10
266 [139]c[178]1[167]a$[178]" you win!":b$[178]a$
268 [139]c[177]1[167]a$[178]" try again":b$[178][196](c)[170]" left!"
270 [151]781,24:[151]782,6:[158]65520
272 [153]"cont"a$[163]23)b$;
274 [146]56464,16:[146]56464,16,16
276 [151]782,7:[158]65520
278 [153]" ";
280 [146]56464,16:[137]144
282 [151]s,240:[151]s[170]1,15:[151]s[170]6,1
284 [151]s[170]5,8:[151]s[170]22,104:[151]s[170]23,2
286 [151]s[170]24,79:[151]s[170]4,129
288 [129]z[178]1[164]20:[130]:[142]